﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class InvfisicoFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As InvfisicoBE
        Dim tmpInvfisico As InvfisicoBE = New InvfisicoBE()
        Try
            With tmpInvfisico
                .Anio = convertDTFromDb.convertInt32(dr.Item("Anio"))
                .ClaProd = convertDTFromDb.ConvertString(dr.Item("ClaProd"))
                .Conteo1 = convertDTFromDb.ConvertDecimal(dr.Item("Conteo1"))
                .Conteo2 = convertDTFromDb.ConvertDecimal(dr.Item("Conteo2"))
                .Dife = convertDTFromDb.ConvertDecimal(dr.Item("Dife"))
                .IdAlmacen = convertDTFromDb.ConvertString(dr.Item("IdAlmacen"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .NumAjuste = convertDTFromDb.ConvertLong(dr.Item("NumAjuste"))
                .Periodo = convertDTFromDb.convertInt32(dr.Item("Periodo"))
                .Ubica = convertDTFromDb.ConvertString(dr.Item("Ubica"))
            End With
            Return tmpInvfisico
        Catch ex As Exception
            Throw
        Finally
            tmpInvfisico = Nothing
        End Try
    End Function

End Class
